/**
 *
 */
package com.zhuoyue.zhtj.service;

import java.util.List;

import com.zhuoyue.zhtj.entity.Tclass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eit.eitsite.common.persistence.Page;
import com.eit.eitsite.common.service.CrudService;
import com.zhuoyue.zhtj.entity.Tmanageclass;
import com.zhuoyue.zhtj.dao.TmanageclassDao;

/**
 * 管理班级名单Service
 * @author hss
 * @version 2017-09-28
 */
@Service
@Transactional(readOnly = true)
public class TmanageclassService extends CrudService<TmanageclassDao, Tmanageclass> {
	@Autowired
	private TmanageclassDao tmanageclassDao;

	public Tmanageclass get(String id) {
		return super.get(id);
	}
	
	public List<Tmanageclass> findList(Tmanageclass tmanageclass) {
		return super.findList(tmanageclass);
	}
	
	public Page<Tmanageclass> findPage(Page<Tmanageclass> page, Tmanageclass tmanageclass) {
		return super.findPage(page, tmanageclass);
	}
	
	@Transactional(readOnly = false)
	public void save(Tmanageclass tmanageclass) {
		super.save(tmanageclass);
	}
	
	@Transactional(readOnly = false)
	public void delete(Tmanageclass tmanageclass) {
		super.delete(tmanageclass);
	}

	public List<String> getClassKqjl(Tclass tclass){
		List<String> list=tmanageclassDao.selectNumByClassId(tclass);
		if(list!=null&&list.size()>0){
			return list;
		}
		return null;
	}

	public int getAllPeopleCount(Tclass tclass){
		return tmanageclassDao.getAllPeopleCount(tclass);
	}
}